package com.vencent.spring.java.test;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import com.vencent.spring.java.bean.Person;
import com.vencent.spring.java.config.PersonConfig;

public class ApplicationContextStarter {
	
	public static void main(String[] args) {
		AnnotationConfigApplicationContext ac = new AnnotationConfigApplicationContext();
		ac.register(PersonConfig.class);
		ac.refresh();
		Person per = (Person) ac.getBean("person");
		per.play();
		Person per1 = (Person) ac.getBean("person1");
		per1.play();
		Person per2 = (Person) ac.getBean("person2");
		per2.play();
		ac.close();
	}
}
